import { use } from 'echarts/core'

// 手动导入ECharts模块以减小包的大小
import { CanvasRenderer } from 'echarts/renderers'
import { BarChart, PieChart, CandlestickChart, MapChart, LineChart } from 'echarts/charts'
import { GridComponent, TooltipComponent, TitleComponent, LegendComponent, ToolboxComponent, BrushComponent, VisualMapComponent, DataZoomComponent } from 'echarts/components'

export default defineNuxtPlugin(() => {
	use([CanvasRenderer, BarChart, PieChart, MapChart, CandlestickChart, LineChart, GridComponent, TooltipComponent, TitleComponent, LegendComponent, ToolboxComponent, BrushComponent, VisualMapComponent, DataZoomComponent])
})
